!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(t){"use strict";var e,i,o,s,n,r,l,u=function(){return"undefined"!=typeof window},f=function(){return e||u()&&(e=window.gsap)&&e.registerPlugin&&e},p=function(t){return"string"==typeof t},a=function(t,e){var i="x"===e?"Width":"Height",r="scroll"+i,l="client"+i;return t===o||t===s||t===n?Math.max(s[r],n[r])-(o["inner"+i]||s[l]||n[l]):t[r]-t["offset"+i]},c=function(t,e){var i="scroll"+("x"===e?"Left":"Top");return t===o&&(null!=t.pageXOffset?i="page"+e.toUpperCase()+"Offset":t=null!=s[i]?s:n),function(){return t[i]}},h=function(t,e){var i=r(t)[0].getBoundingClientRect(),l=!e||e===o||e===n,u=l?{top:s.clientTop-(o.pageYOffset||s.scrollTop||n.scrollTop||0),left:s.clientLeft-(o.pageXOffset||s.scrollLeft||n.scrollLeft||0)}:e.getBoundingClientRect(),f={x:i.left-u.left,y:i.top-u.top};return!l&&e&&(f.x+=c(e,"x")(),f.y+=c(e,"y")()),f},y=function(t,e,i,o){return isNaN(t)?p(t)&&"="===t.charAt(1)?parseFloat(t.substr(2))*("-"===t.charAt(0)?-1:1)+o:"max"===t?a(e,i):Math.min(a(e,i),h(t,e)[i]):parseFloat(t)},d=function(){e=f(),u()&&e&&document.body&&(o=window,n=document.body,s=document.documentElement,r=e.utils.toArray,e.config({autoKillThreshold:7}),l=e.config(),i=1)},x={version:"3.1.1",name:"scrollTo",rawVars:1,register:function(t){e=t,d()},init:function(t,e,s,n,r){i||d();this.isWin=t===o,this.target=t,this.tween=s,"object"!=typeof e?p((e={y:e}).y)&&"max"!==e.y&&"="!==e.y.charAt(1)&&(e.x=e.y):e.nodeType&&(e={y:e,x:e}),this.vars=e,this.autoKill=!!e.autoKill,this.getX=c(t,"x"),this.getY=c(t,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=e.x?(this.add(this,"x",this.x,y(e.x,t,"x",this.x)-(e.offsetX||0),n,r,Math.round),this._props.push("scrollTo_x")):this.skipX=1,null!=e.y?(this.add(this,"y",this.y,y(e.y,t,"y",this.y)-(e.offsetY||0),n,r,Math.round),this._props.push("scrollTo_y")):this.skipY=1},render:function(t,e){for(var i,s,n,r,u,f=e._pt,p=e.target,c=e.tween,h=e.autoKill,y=e.xPrev,d=e.yPrev,x=e.isWin;f;)f.r(t,f.d),f=f._next;i=x||!e.skipX?e.getX():y,n=(s=x||!e.skipY?e.getY():d)-d,r=i-y,u=l.autoKillThreshold,e.x<0&&(e.x=0),e.y<0&&(e.y=0),h&&(!e.skipX&&(r>u||r<-u)&&iu||n<-u)&&s